/**
*@Author 周贞荣
*@Modify 周贞荣
*@Date 2022/3/23 21:02
*@Description 文件功能描述
*/
<template>
    <div class="flex wh100">
        <van-sidebar class="h100 bgFF shadow03" v-model="active">
            <van-sidebar-item v-for="item in $store.state.tabs.classifyList"
                              :key="item.id"
                              :title="item.title" :name="item.id"/>
        </van-sidebar>
        <div class="flex-full h100 overflow-x bgF7">
            <ListView :active="active"/>
        </div>
    </div>
</template>

<script lang="ts" setup>
    import ListView from './views/ListView.vue';
    import {getCurrentInstance, computed} from "vue";

    const {proxy} = getCurrentInstance();
    // 当前选中
    const active = computed({
        get() {
            return proxy.$store.state.tabs.classifyNum || 0;
        },
        set(val) {
            proxy.$store.commit('tabs/setClassifyNum', val)
        },
    });
</script>

<style scoped>

</style>